<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      name="viewport"
      content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
    />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>按钮悬停效果集合</title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        user-select: none;
      }

      body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        padding: 40px;
      }

      .button-group {
        display: flex;
        flex-direction: column;
        gap: 20px;
        align-items: center;
      }

      .group-title {
        color: white;
        font-size: 24px;
        font-weight: 600;
        margin-bottom: 10px;
      }

      .button-row {
        display: flex;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
      }

      /* 基础按钮样式 */
      .btn {
        padding: 14px 32px;
        font-size: 16px;
        font-weight: 500;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        color: white;
        background: #667eea;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
      }

      /* 1. 缩放效果 */
      .btn-scale:hover {
        transform: scale(1.1);
      }

      /* 2. 上浮效果 */
      .btn-lift:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
      }

      /* 3. 下压效果 */
      .btn-press:hover {
        transform: translateY(2px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      }

      /* 4. 背景色变化 */
      .btn-bg-change {
        background: #667eea;
      }

      .btn-bg-change:hover {
        background: #764ba2;
      }

      /* 5. 边框动画 */
      .btn-border {
        background: transparent;
        border: 2px solid #667eea;
      }

      .btn-border:hover {
        background: #667eea;
        border-color: #764ba2;
      }

      /* 6. 阴影效果 */
      .btn-shadow:hover {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
      }

      /* 7. 渐变背景 */
      .btn-gradient {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      }

      .btn-gradient:hover {
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
      }

      /* 8. 波纹效果 */
      .btn-ripple {
        position: relative;
        overflow: hidden;
      }

      .btn-ripple::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        transform: translate(-50%, -50%);
        transition: width 0.6s, height 0.6s;
      }

      .btn-ripple:hover::before {
        width: 300px;
        height: 300px;
      }

      /* 9. 滑动背景 */
      .btn-slide {
        background: linear-gradient(90deg, #667eea 50%, #764ba2 50%);
        background-size: 200% 100%;
        background-position: right;
      }

      .btn-slide:hover {
        background-position: left;
      }

      /* 10. 3D 效果 */
      .btn-3d {
        transform-style: preserve-3d;
        perspective: 1000px;
      }

      .btn-3d:hover {
        transform: rotateX(10deg) rotateY(10deg);
      }

      /* 11. 发光效果 */
      .btn-glow {
        box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
      }

      .btn-glow:hover {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.8), 0 0 30px rgba(102, 126, 234, 0.6);
      }

      /* 12. 模糊背景 */
      .btn-blur {
        backdrop-filter: blur(10px);
        background: rgba(102, 126, 234, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
      }

      .btn-blur:hover {
        background: rgba(102, 126, 234, 0.5);
      }
    </style>
  </head>
  <body>
    <div class="button-group">
      <div class="group-title">按钮悬停效果</div>
      <div class="button-row">
        <button class="btn btn-scale">缩放</button>
        <button class="btn btn-lift">上浮</button>
        <button class="btn btn-press">下压</button>
        <button class="btn btn-bg-change">背景变化</button>
        <button class="btn btn-border">边框动画</button>
        <button class="btn btn-shadow">阴影</button>
        <button class="btn btn-gradient">渐变</button>
        <button class="btn btn-ripple">波纹</button>
        <button class="btn btn-slide">滑动背景</button>
        <button class="btn btn-3d">3D效果</button>
        <button class="btn btn-glow">发光</button>
        <button class="btn btn-blur">模糊背景</button>
      </div>
    </div>
  </body>
</html>

